package com.project;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@SpringBootApplication
@ServletComponentScan(basePackages = {"com.project.course.controller", "com.project.course.service",/* "com.project.config"*/})
// 配置好swagger类之后，需要引入对应的类到容器里
@MapperScan(basePackages = "com.project.course.mapper")
@EnableSwagger2
public class ProjectApplication  /*extends SpringBootServletInitializer*/ {

    public static void main(String[] args) {

        SpringApplication.run(ProjectApplication.class, args);
    }
//    @Override
//    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
//        return application.sources(ProjectApplication.class);
//    }

}


